import request from '@/utils/request'

export function addcategorybrandrelation(data) {
  return request({
    url: '/product/categorybrandrelation',
    method: 'post',
    data
  })
}

export function delcategorybrandrelation(id) {
  return request({
    url: '/product/categorybrandrelation/' + id,
    method: 'delete'
  })
}

export function edit(data) {
  return request({
    url: '/product/categorybrandrelation',
    method: 'put',
    data
  })
}

export function getAttrAttrgroupRelation(id) {
  return request({
    url: '/product/categorybrandrelation/' + id,
    method: 'get'
  })
}

export function listAttrAttrgroupRelation(params) {
  return request({
    url: '/product/categorybrandrelation/list',
    method: 'get',
    params
  })
}

export default { addcategorybrandrelation, edit, delcategorybrandrelation, getAttrAttrgroupRelation, listAttrAttrgroupRelation }
